<cfcomponent output="false">
	
	<cffunction name="fGetLogin" returntype="struct" access="public">
		<cfargument name="sEmail" required="true">
		<cfargument name="sMotDePasse" required="true">
		
		<cfset local = structNew()>
		
		<cfinvoke component="dao_utilisateurs" method="fGet" returnvariable="local.qValideLogin" >
			<cfinvokeargument name="sEmail" value="#arguments.sEmail#">
			<cfinvokeargument name="sMotDePasse" value="#arguments.sMotDePasse#">
		</cfinvoke>
		
		<cfset local.stUsers = structNew()>
		
		<cfset local.stUsers.bValideLogin = false>
		<cfset local.stUsers.idUser = "">
		<cfset local.stUsers.sIdentifiant = "">
		<cfset local.stUsers.sNom = "">
		<cfset local.stUsers.sPrenom = "">
		
		<cfif local.qValideLogin.recordcount EQ 1>
			<cfset local.stUsers.bValideLogin = true>
			<cfset local.stUsers.idUser = local.qValideLogin.user_id>
			<cfset local.stUsers.sIdentifiant = local.qValideLogin.user_email>
			<cfset local.stUsers.sNom = local.qValideLogin.user_nom>
			<cfset local.stUsers.sPrenom = local.qValideLogin.user_prenom>
		</cfif>
		
		<cfreturn local.stUsers>
	</cffunction>
	
</cfcomponent>